From: Brad Jorsch Date: Tue, 10 Jul 2018 18:13:58 +0000 (-0400) Subject: SpecialChangeEmail: Log email changes X-Git-Tag: 1.31.1~16 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/%22%24diffUrl/%40%20%27info_etape_suivante_2%27%20=%3E%20%27You%20can%20move%20on%20to%20the%20next%20step.%27%2C%20%27info_exceptions_proxy%27%20=%3E%20%27Exceptions%20for%20the%20proxy%27%2C%20%27info_exportation_base%27%20=%3E%20%27export%20database%20to%20%40archive%40%27%2C-%27info_facilite_suivi_activite%27%20=%3E%20%27To%20simplify%20monitoring%20of%20the%20site/%27s%20editorial;-%20%20activities%2C%20SPIP%20can%20send%20rmail%20notifications%2C%20e.g.%20to%20an%20editors/%27%20mailing%20list%2C%20%27info_facilite_suivi_activite%27%20=%3E%20%27To%20simplify%20monitoring%20of%20the%20site%C3%A2%C2%80%C2%99s%20editorial;%20%20%20activities%2C%20SPIP%20can%20send%20rmail%20notifications%2C%20e.g.%20to%20an%20editors%C3%A2%C2%80%C2%99%20mailing%20list%2C%20%20%20of%20publication%20requests%20and%20article%20validations.%27%2C%20%27info_fichiers_authent%27%20=%3E%20%27Authentication%20file?a=commitdiff_plain;h=2bf035f9f4b7b864fd3e9f4164292f05905bac08;p=lhc%2Fweb%2Fwiklou.git SpecialChangeEmail: Log email changes Bug: T151415 Change-Id: Icc403be286f87a591ebc9d3e07d84b09f8b87713 --- diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index 818308a658..7872403e41 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -12,6 +12,7 @@ This is a security and maintenance release of the MediaWiki 1.31 branch. * (T191608, T187638) Add 'logid' parameter to Special:Log. * (T193829) Indicate when a Bot Password needs reset. * (T198037) GitInfo: Don't try shelling out if it's disabled. +* (T151415) Log email changes. == MediaWiki 1.31 == diff --git a/includes/specials/SpecialChangeEmail.php b/includes/specials/SpecialChangeEmail.php index c5143002c3..3d24832be4 100644 --- a/includes/specials/SpecialChangeEmail.php +++ b/includes/specials/SpecialChangeEmail.php @@ -22,6 +22,7 @@ */ use MediaWiki\Auth\AuthManager; +use MediaWiki\Logger\LoggerFactory; /** * Let users change their email address. @@ -167,6 +168,14 @@ class SpecialChangeEmail extends FormSpecialPage { return $status; } + LoggerFactory::getInstance( 'authentication' )->info( + 'Changing email address for {user} from {oldemail} to {newemail}', [ + 'user' => $user->getName(), + 'oldemail' => $oldaddr, + 'newemail' => $newaddr, + ] + ); + Hooks::run( 'PrefsEmailAudit', [ $user, $oldaddr, $newaddr ] ); $user->saveSettings();